package.cpath = '../../../luaclib/?.so;' .. package.cpath
package.path = '/home/dev/project/frame/tablesvr/games/?.lua;../../../common/?.lua;' .. '../../../lualib/?.lua;' .. package.path

----------------------------------------------------------------------
local CT_SINGLE = 1                 --单牌类型
local CT_DOUBLE = 2                 --对子类型
local CT_SHUN_ZI = 3                --顺子类型
local CT_JIN_HUA = 4                --金花类型
local CT_SHUN_JIN = 5               --顺金类型
local CT_BAO_ZI = 6                 --豹子类型
local CT_SPECIAL = 7                --特殊类型

local print = print

require "preload"

_ENV.print = print
_ENV.dbglog = print

local AVAILABLE_BETTING_COINS_MAP = {
    100,1000,10000,100000,
}

local hhdz = require "hhdz"

local hhdz_instance = hhdz.new()

assert(hhdz_instance:init())
assert(hhdz_instance:start_game())

assert(hhdz_instance:shuffle())
assert(hhdz_instance:deal())

hhdz_instance.rb_cards_map[1] = {101,201,301}

hhdz_instance:start_betting()

for uid = 10000,10100 do
    local coins = AVAILABLE_BETTING_COINS_MAP[
        math.random(1,#AVAILABLE_BETTING_COINS_MAP)
    ]
    -- assert(hhdz_instance:bet(uid,math.random(1,2),coins))
    hhdz_instance:bet(uid,2,coins)
    assert(hhdz_instance:bet(uid,3,coins))
    hhdz_instance:bet(uid,1,coins)
end

assert(hhdz_instance:judge_result())

print(tostring_r(hhdz_instance:get_game_result()))
